package com.hnust.dao;

import com.hnust.domain.College;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CollegeDao {
	@Select("select name from college where col_id=#{collegeId}")
	@ResultType(String.class)
	String getCollegeNameById(String collegeId);

    @Select("select * from college where col_id = #{collegeId}")
    @ResultType(College.class)
    College getCollege(String collegeId);

    @Select("select * from college")
    @ResultType(College.class)
    List<College> getAllCollege();

}

